﻿<UserControl x:Class="TFSWorkflowControl.TSWA.SL.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="150">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="ItemsDictionary.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <StackPanel Background="White">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <StackPanel Orientation="Horizontal" Margin="4" Height="20">
                <TextBlock Text="Group by : " VerticalAlignment="Center"/>
                <ComboBox 
                x:Name="cbGroup" 
                VerticalAlignment="Center"
                SelectionChanged="cbGroup_SelectionChanged">
                    <ComboBox.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding}" />
                        </DataTemplate>
                    </ComboBox.ItemTemplate>
                </ComboBox>
            </StackPanel>
            <TextBlock Grid.Column="1" x:Name="versionLabel" Text="" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="5,0" Foreground="Gainsboro"/>
        </Grid>
        <Grid x:Name="LayoutRoot" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"  Background="White" Height="121">
            <ScrollViewer 
                HorizontalScrollBarVisibility="Auto" 
                VerticalScrollBarVisibility="Hidden" 
                Margin="5,0,5,0" 
                Height="121">
                <ItemsControl  
                    x:Name="stateControl"   
                    ItemsSource="{Binding}"
                    ItemsPanel="{StaticResource ItemsPanelTemplate}" 
                    ItemTemplate="{StaticResource GroupInfo}"
                    IsHitTestVisible="True"/>
                <!-- -->
            </ScrollViewer>
        </Grid>
    </StackPanel>
</UserControl>
